/******************************************************************************************************
Copyright (C) 2013 Mestrelab Research S.L. All rights reserved.

This file is part of the Mnova scripting toolkit.

Authorized users of MNova Software may use this file freely, but this file is provided AS IS
with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
*****************************************************************************************************/

/*globals MultipletReportDialog, Env, reportMultiplets, Application, MnUi*/
/*jslint plusplus: true, indent: 4*/

function reportMultipletsGUI() {
	"use strict";

//The dialog will not save the selected reporter as default
	var diag = new MultipletReportDialog(Env.MultipletReportersArray, false),
		repString,
		reporter;

	if (diag.exec()) {
		repString = diag.getSelectedReporter();
		reporter = diag.reporter();
		return reportMultiplets(reporter);
	}
}

if (this.MnUi && MnUi.scripts_nmr) {
	MnUi.scripts_nmr.scripts_nmr_ReportMultiplets = reportMultipletsGUI;
}
